*Kalmoe & Mason - How to Measure Public Support for Political Violence 

*Replication File for 2022 CES Analysis

use "/Users/npkalmoe/Dropbox/Research/A Publishing/A Mason-Kalmoe Extreme Partisanship/Current Papers/POQ - Measuring/POQ Final Files/Replication Files/CCES22_JHU_OUTPUT.dta", clear

svyset [pw=teamweight]
set more off

*3-pt Party ID (Rep=1 Pure Ind=0 Dem=-1)
gen rep3=pid7
recode rep3 1 2 3=-1 4 8 9=0 5 6 7=1
tab rep3 pid7, miss

*Indicator identifying partisans (incl. leaners)
gen partisan=rep3
recode partisan -1 1=1 0=0

*Attention Check
gen attnfist=JHU358
recode attnfist 1=1 2/5=0 else=.


**Profiles --> How many people support...

*Kill protesters
gen killprotestpost=JHU445
recode killprotestpost 1=0 2=.25 3=.5 4=.75 5=1 else=.
tab killprotestpost JHU445, miss
svy: tab killprotestpost if partisan==1, col 
* 4% >0

*Violence if opponents violent first
gen inviolviol=JHU362
recode inviolviol 1=0 2=.25 3=.5 4=.75 5=1 else=.
svy: tab inviolviol if partisan==1, col 
* 48% >0


**CONSIDERING GENERAL AND SPECIFIC QUESTIONS --> Limits of Specific Qs

*January 6th support
gen jan6support=JHU338
recode jan6support 1=1 2=.75 3=.5 4=.25 5=0 else=.
tab jan6support JHU338, miss

*Indicator for Jan 6 support (.75 or 1)
gen jan6support2=jan6support
recode jan6support2 1 .75=1 .5 .25 0=0 else=.


*In-party violence today
gen inviol=JHU355
recode inviol 1=0 2=.25 3=.5 4=.75 5=1 else=.
tab inviol JHU355, miss

*Indicator for in-party violence today, support/not (>0)
gen inviol2=inviol
recode inviol2 0=0 .01/1=1


*Comparing support 
ttest jan6support2=inviol2 if rep3==1
ttest jan6support2=inviol2 if rep3==1 & attnfist==1


**CONSIDERING GENERAL & SPECIFIC QUESTIONS -->-->Using General Questions as Proxies...

*Fistfights
gen fists=JHU357
recode fists 1=0 2=.25 3=.5 4=.75 5=1 else=.
*Property damage
gen property=JHU359
recode property 1=0 2=.25 3=.5 4=.75 5=1 else=.
*Kill protesters (coded above)
*Kill leaders
gen killleaders=JHU360A
recode killleaders 1=0 2=.25 3=.5 4=.75 5=1 else=.
*Kill voters
gen killvoters=JHU360B
recode killvoters 1=0 2=.25 3=.5 4=.75 5=1 else=.

*Correlations of generic item with specific items
cor inviol property if partisan==1
cor inviol fists if partisan==1
cor inviol killvoters if partisan==1
cor inviol killleaders if partisan==1
cor inviol killprotestpost if partisan==1

*Repeating among survey-attentive
cor inviol property if partisan==1 & attnfist==1
cor inviol fists if partisan==1 & attnfist==1
cor inviol killleaders if partisan==1 & attnfist==1
cor inviol killvoters if partisan==1 & attnfist==1
cor inviol killprotestpost if partisan==1 & attnfist==1


**WHEN DETAILS MATTER --> Who is the target?
gen killvoters2=killvoters
recode killvoters2 0=0 .01/1=1 else=.
gen killleaders2=killleaders
recode killleaders2 0=0 .01/1=1 else=.

ttest killvoters2=killleaders2 if partisan==1, unpaired
ttest killvoters2=killleaders2 if partisan==1 & attnfist==1, unpaired

gen killleaderspost=JHU444
recode killleaderspost 1=0 2=.25 3=.5 4=.75 5=1 else=.
gen killleaderspost2=killleaderspost
recode killleaderspost2 0=0 .01/1=1 else=.

gen killprotestpost2=killprotestpost
recode killprotestpost2 0=0 .01/1=1 else=.

ttest killprotestpost2=killleaderspost2 if partisan==1


**WHEN DETAILS MATTER --> What type of violence?
gen fists2=fists
recode fists2 0=0 .01/1=1 else=.
gen property2=property
recode property2 0=0 .01/1=1 else=.

*Table 2
svy: tab killleaders if partisan==1
svy: tab killvoters if partisan==1
svy: tab fists if partisan==1
svy: tab property if partisan==1
svy: tab inviol if partisan==1

*t-tests
ttest killleaders2=fists2 if partisan==1, unpaired
ttest killvoters2=fists2 if partisan==1, unpaired
ttest killleaders2=property2 if partisan==1, unpaired
ttest killvoters2=property2 if partisan==1, unpaired
ttest fists2=property2 if partisan==1, unpaired

*Among the attentive
svy: tab killleaders if partisan==1 & attnfist==1
svy: tab killvoters if partisan==1 & attnfist==1
svy: tab fists if partisan==1 & attnfist==1
svy: tab property if partisan==1 & attnfist==1
svy: tab inviol if partisan==1 & attnfist==1


**WHEN DETAILS MATTER --> What kind of provocation?

gen banrifleviol=JHU448
recode banrifleviol 1=1 2=0 3=.5 else=.
gen bangunsviol=JHU449
recode bangunsviol 1=1 2=0 3=.5 else=.
gen banabortviol=JHU450
recode banabortviol 1=1 2=0 3=.5 else=.
gen legalabortviol=JHU451
recode legalabortviol 1=1 2=0 3=.5 else=.
gen defundpoliceviol=JHU456
recode defundpoliceviol 1=1 2=0 3=.5 else=.
gen rejectblkvotesviol=JHU455
recode rejectblkvotesviol 1=1 2=0 3=.5 else=.
gen banbirthcontrolviol=JHU453
recode banbirthcontrolviol 1=1 2=0 3=.5 else=.
gen banlgbtmarryviol=JHU452
recode banlgbtmarryviol 1=1 2=0 3=.5 else=.
gen teachraceviol=JHU457
recode teachraceviol 1=1 2=0 3=.5 else=.
gen teachlgbtviol=JHU458
recode teachlgbtviol 1=1 2=0 3=.5 else=.
gen schoolprayviol=JHU454
recode schoolprayviol 1=1 2=0 3=.5 else=.

*Table 3 (& in-text party comparison)
svy: tab banrifleviol rep3, col
svy: tab bangunsviol rep3, col
svy: tab banabortviol rep3, col
svy: tab legalabortviol rep3, col
svy: tab defundpoliceviol rep3, col
svy: tab rejectblkvotesviol rep3, col
svy: tab banbirthcontrolviol rep3, col
svy: tab banlgbtmarryviol rep3, col
svy: tab teachraceviol rep3, col
svy: tab teachlgbtviol rep3, col
svy: tab schoolprayviol rep3, col

*By attention
svy: tab banrifleviol rep3 if attnfist==1, col
svy: tab rejectblkvotesviol rep3 if attnfist==1, col
svy: tab banbirthcontrolviol rep3 if attnfist==1, col
svy: tab banlgbtmarryviol rep3 if attnfist==1, col
svy: tab teachraceviol rep3 if attnfist==1, col
svy: tab teachlgbtviol rep3 if attnfist==1, col
svy: tab schoolprayviol rep3 if attnfist==1, col


*DATA QUALITY... --> Respondent inattention...

tab attnfist

svy: reg inviol if partisan==1 & attnfist==1
svy: reg inviol if partisan==1 & attnfist==0



